<?php
class Contrata_modelo extends CI_Model {
	
var $nombreContrata = '';
	var $actividad = '';
	
	var $idPromotor='';

function __construct()
{
parent::__construct();


}

function insertar_contrata(){
	
	
	$this->nombreContrata = $this->input->post('nombre');
	$this->actividad = $this->input->post('actividad');
	$this->idPromotor = $this->input->post('promotor');
	
	
	
		
	$this->db->insert('contrata',$this);
	
		
}


function listado(){
	
		$query = $this->db->get('contrata');
        return $query->result(); 
        
}

function nombreContrata($idCon){
	
	$query=$this->db->where('idContrata', $idCon);
	$query=$this->db->get('contrata');
	return $query->result(); 
}





}